/**********************************************
*  Classes:   Loader3ds
*  Desc:      Loads .3ds files and creates
*		      MeshNodes. Used by CdnResourceLoader
*  Author:    Vaios Kalpias-Ilias (C) 2008-2009
***********************************************/

#ifndef LOADER3DS_H
#define LOADER3DS_H

class GeometryNode;
class CdnRenderer;
#include "Vector.h"

class Loader3ds
{
	friend class CdnResourceLoader;

private:

	Loader3ds();
	~Loader3ds();

	// loads a 3ds file and creates
	// a geometry node to display it
	static GeometryNode* Load(const char *filename,
		CdnRenderer* renderer);

	typedef struct index_t
	{
		unsigned short a;
		unsigned short b;
		unsigned short c;
	}Index;

	typedef struct vertex_t
	{
		mth::Vector3 vertex;
		mth::Vector3 normal;
		mth::Vector2 texCoord;
	}Vertex;

	typedef struct mesh_t
	{
		Vertex *vertex_array;
	}Mesh;
};

#endif